feat(client): support isolated RPC connections - #401
Draft
dvcolomban wants to merge 5 commits into
Draft
dvcolomban wants to merge 5 commits into
dvcolomban wants to merge 5 commits into
Conversation
|
@dvcolomban is attempting to deploy a commit to the NuxtLabs Team on Vercel. A member of the Team first needs to authorize it. |
This was referenced Sep 24, 2026
dvcolomban
commented
Sep 25, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background (Why)
An external viewer can open RPC connections to independent Devframe endpoints in one browser document. Shared connection discovery can reuse the first endpoint, while browser credential storage and the
devframe-authBroadcastChannel can overwrite another endpoint's remembered token. Explicit connection descriptors select an endpoint but still participate in this shared authentication state.The authentication broadcast contains a token without a backend identifier. Applications that manage independent connections or their own credential persistence need an explicit way to opt out of this shared state.
Changes (What)
Add
isolated?: booleantoDevframeConnection. An isolated connection skips shared connection discovery, credential storage and authentication broadcasts. Token and one-time-code authentication still use its own RPC transport and update the retained descriptor. Omitting the flag or usingfalsepreserves existing shared behavior.Setup accepts either a complete connection or
DevframeConnectionDiscoveryOptionsbefore metadata has been resolved:The named discovery type also accepts shared mode, so it does not imply an already resolved, isolated connection. Reusing a prepared descriptor preserves its isolation setting. JSDoc on the flag, discovery type and channel guard explains why unscoped authentication broadcasts are skipped.
Verification (Testing)
All 48 tests in the six affected connection/authentication files pass. They cover shared defaults, token precedence for provided and fetched metadata, independent token updates, descriptor reuse and transport disposal. Browser storage and transport I/O are mocked at their existing boundaries.
All 92 Devframe API snapshot checks pass locally on the PR branch. The extracted input type is assignable to and from the previous inline shape. Package build, typecheck and changed-file ESLint pass. Full monorepo validation runs in PR CI.
The current merge-check CI reports three diagnostics declaration snapshot mismatches. The same three mismatches occur on upstream main 9aa752a1, which is the upstream commit used by the PR merge check. The changed client snapshot passes; these diagnostics snapshots are outside this connection-isolation change.